<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditUsers.aspx.cs" MasterPageFile="~/Site.master" Inherits="Hydra.Web.Administration.EditUsers" %>
<%@ Register Src="UserProfile.ascx" TagName="UserProfile" TagPrefix="mb" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<div>General user information</div>
<p></p>
<table cellpadding="2">
   <tr>
      <td width="130">UserName:</td>
      <td width="300"><asp:Literal runat="server" ID="lblUserName" /></td>
   </tr>
   <tr>
      <td>E-mail address:</td>
      <td><asp:HyperLink ID="lnkEmailAddress" runat="server" /></td>
   </tr>
   <tr>
      <td>Registered:</td>
      <td><asp:Literal  ID="lblRegistered" runat="server" /></td>
   </tr>
   <tr>
      <td>Last Login:</td>
      <td><asp:Literal ID="lblLastLogin" runat="server" /></td>
   </tr>
   <tr>
      <td>Last Activity:</td>
      <td><asp:Literal ID="lblLastActivity" runat="server" /></td>
   </tr>
   <tr>
      <td>Online Now:</td>
      <td><asp:CheckBox ID="chkIsOnlineNow" Enabled="false" runat="server" /></td>
   </tr>
   <tr>
      <td>Approved:</td>
      <td><asp:CheckBox ID="chkIsApproved" AutoPostBack="true" OnCheckedChanged="chkIsApproved_CheckedChanged" runat="server"/></td>
   </tr>
   <tr>
      <td>Locked Out:</td>
      <td><asp:CheckBox ID="chkIsLockedOut" AutoPostBack="true" OnCheckedChanged="chkIsLockedOut_CheckedChanged" runat="server"/></td>
   </tr>
</table>
<p></p>
<p></p>
<div>User's roles</div>
<p></p>
<asp:CheckBoxList runat="server" ID="chklRoles" RepeatColumns="5" CellSpacing="4" />
<table cellpadding="2" width="450">
   <tr><td align="right">
      <asp:Label runat="server" ID="lblRolesOK" 
         Text="Roles were successfully updated" Visible="false" />
      <asp:Button ID="btnUpdate" Text="Update"
         OnClick="btnUpdate_Click" runat="server"/>
   </td></tr>
   <tr><td align="right">
      <small>Create new role: </small>
      <asp:TextBox ID="txtNewRole" runat="server"/>
      <asp:RequiredFieldValidator ID="validatorRequireRole" 
         ControlToValidate="txtNewRole" SetFocusOnError="true"
         ErrorMessage="Role name is required."   ValidationGroup="CreateRole" runat="server">
      </asp:RequiredFieldValidator>
      <asp:Button runat="server" ID="btnCreate" Text="Create"
         ValidationGroup="CreateRole" OnClick="btnCreate_Click" />
   </td></tr>
</table>
<p></p>
<div>Edit user's profile</div>
<p></p>
<mb:UserProfile ID="UserProfile1" runat="server" />
   <table cellpadding="2" width="400">
   <tr><td align="right">
      <asp:Label ID="lblProfileOK" Text="Profile was successfully updated" Visible="false" runat="server"/>
      <asp:Button ID="btnUpdateProfile" Text="Update" runat="server"
       ValidationGroup="EditProfile" OnClick="btnUpdateProfile_Click"/>
   </td></tr>
</table>
</asp:Content>